Optimal. Leaf size=33 \[ a^2 x+\frac{2 a b \tanh ^{-1}(\sin (c+d x))}{d}+\frac{b^2 \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0256904, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3773, 3770, 3767, 8} \[ a^2 x+\frac{2 a b \tanh ^{-1}(\sin (c+d x))}{d}+\frac{b^2 \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3773
Rule 3770
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int (a+b \sec (c+d x))^2 \, dx &=a^2 x+(2 a b) \int \sec (c+d x) \, dx+b^2 \int \sec ^2(c+d x) \, dx\\ &=a^2 x+\frac{2 a b \tanh ^{-1}(\sin (c+d x))}{d}-\frac{b^2 \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}\\ &=a^2 x+\frac{2 a b \tanh ^{-1}(\sin (c+d x))}{d}+\frac{b^2 \tan (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.0750027, size = 32, normalized size = 0.97 \[ \frac{a^2 d x+2 a b \tanh ^{-1}(\sin (c+d x))+b^2 \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.023, size = 49, normalized size = 1.5 \begin{align*}{a}^{2}x+2\,{\frac{ab\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{{b}^{2}\tan \left ( dx+c \right ) }{d}}+{\frac{{a}^{2}c}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.16769, size = 54, normalized size = 1.64 \begin{align*} a^{2} x + \frac{2 \, a b \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right )}{d} + \frac{b^{2} \tan \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.73746, size = 193, normalized size = 5.85 \begin{align*} \frac{a^{2} d x \cos \left (d x + c\right ) + a b \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - a b \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + b^{2} \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (c + d x \right )}\right )^{2}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.31261, size = 104, normalized size = 3.15 \begin{align*} \frac{{\left (d x + c\right )} a^{2} + 2 \, a b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, a b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - \frac{2 \, b^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]